# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fping
pkgver=5.1
pkgrel=1
pkgdesc="A utility to ping multiple hosts at once"
url="https://fping.org/"
arch="all"
license="MIT"
makedepends="libcap"
subpackages="$pkgname-doc"
source="https://fping.org/dist/fping-$pkgver.tar.gz"
options="!check" # no testsuite

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--enable-ipv6
	make
}

package() {
	make install DESTDIR="$pkgdir"
	setcap cap_net_raw=+ep "$pkgdir"/usr/sbin/fping
}

sha512sums="
1a208da8dcd99093d0512af5d85ba5e7b5743ec97993d24c1fe612bb58d93090ac1ba0952f648aa075f16d390a77c4be65e394ae56dbede2a6914e0e8c68e2bd  fping-5.1.tar.gz
"
